/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo08_匿名对象 {
    public static void main(String[] args) {

        // 创建一个对象(类进行实例化)
/*        Student student=new Student();
        student.name="小龙";
        student.age=20;

        method(student);*/
/*
        method(new Student());

        Student student = new Student();
        method(student);

        new Student().name="张三";

        System.out.println(new Student().name);*/


//        Student student = new Student();
//        student.study();


        new Student().study();



    }

    public static void method(Student student){
        System.out.println("方法调用成功");
    }
}
